local uri_args = ngx.req.get_uri_args()  
local table_args = {}

for k, v in pairs(uri_args) do  
    if type(v) == "table" then  
    	table_args[k] = v 
        --ngx.say(k, " : ", table.concat(v, ", "), "<br/>")  
    else  
    	table_args[k] = v
       -- ngx.say(k, ": ", v, "<br/>")  
    end  
     
end  


 local secretkey='1234567890abcdefghi'

 if table_args['user_name'] == nil or table_args['pwd'] ==nil then
	ngx.req.set_header("Check-Login", "NULL")
 else

 	local ctoken = ngx.md5('user_name:' .. table_args['user_name']  .. '&pwd:' .. table_args['pwd'] .. '&secretkey:' .. secretkey)

    ngx.req.set_header("Check-Login", "YES")

 end

return




